﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Windows8SlideshowWallpaperUtil.Properties;
using System.IO;

namespace Windows8SlideshowWallpaperUtil
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Windows8SlideshowWallpaperUtil.Properties.Settings settings= Windows8SlideshowWallpaperUtil.Properties.Settings.Default;
            if (settings.FavoriteDirectory == null || "" == settings.FavoriteDirectory.Trim())
            {
                settings.FavoriteDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)+"\\favorite wallpapers";
            }
            if (!Directory.Exists(settings.FavoriteDirectory))
            {
                Directory.CreateDirectory(settings.FavoriteDirectory);
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            MainComponent main = new MainComponent();
            Application.Run(main.AppContext);
        }
    }
}
